﻿@model N03_11HCA_HTTTHD.Models.Kho_ThemRaoVat
@using N03_11HCA_HTTTHD.Models

@{
    ViewBag.Title = "Thêm rao vặt";
    Layout = "~/Views/Shared/_LayoutKho.cshtml";
}
@section JavaScriptCSSImport{
    <link href="@Url.Content("~/Content/mycontent/list_counter.css")" rel="stylesheet" type="text/css"/>
    <script type="text/javascript">
        function validateForm() {
            var chude = document.forms["RaoVat"]["@Kho_ThemRaoVat.Name_chuDe"].value;
            var noidung = document.forms["RaoVat"]["@Kho_ThemRaoVat.Name_noiDung"].value;
            if (chude == null || chude == "") {
                alert("Vui lòng nhập chủ đề");
                return false;
            }
            if (noidung == null || noidung == "") {
                alert("Vui lòng nhập nội dung");
                return false;
            }
            return true;
            }
    </script>
}
 
 <h2>Thêm rao vặt</h2>
<form name="RaoVat" method="post" action="/Kho/ThemRaoVat" onsubmit="return validateForm()">

<table border="0" cellpadding="0" cellspacing="0">
    <tbody>
        <tr>
            <td colspan="2">
                <span>THÔNG TIN RAO VẶT</span>
            </td>
        </tr>
         <tr>
            <td>
                <span>Chủ đề: </span>
            </td>  
            
            <td>
                 <input type="text" name="@Kho_ThemRaoVat.Name_chuDe"/>
            </td>         
        </tr>
        <tr>
            <td>
                <span>Nội dung : </span>
            </td>  
            
            <td>
                 <textarea cols ="90" rows="10" name="@Kho_ThemRaoVat.Name_noiDung"></textarea>
            </td>         
        </tr>
        <tr>
            <td>
                <input type="submit" name="luuthongtin_rv" value=" Thêm" />
                 <input type="reset" name="xoa_rv"  value="Hủy"/>
            </td>            
        </tr>
    </tbody>
</table>
</form>